@import '~ng-devui/styles-var/devui-var.scss';

.devui-overview-wrapper {
  padding: 20px 0;

  .d-overview-introduce {
    h1 {
      margin: 32px 0;
      display: flex;
      align-items: center;
      font-size: $devui-font-size-data-overview;

      .d-overview-total-components {
        display: inline-block;
        margin-left: 8px;
        width: 16px;
        height: 16px;
        line-height: 16px;
        text-align: center;
        font-size: $devui-font-size;
        color: $devui-disabled-text;
        border: 1px solid $devui-disabled-line;
        border-radius: $devui-border-radius;
        background-color: $devui-disabled-bg;
      }
    }

    .d-overview-introduce-description {
      margin: 28px 0;
    }

    d-search {
      width: 100%;
    }

    .d-overview-filters {
      margin-top: 18px;
      display: flex;

      .d-overview-filters-title {
        margin-right: 8px;
        font-size: $devui-font-size-card-title;
        font-weight: $devui-font-title-weight;
      }

      .d-overview-filters-item {
        margin-right: 4px;
      }
    }
  }

  .d-overview-components {
    .d-overview-components-list {
      padding: 20px 0;

      .d-overview-component-title {
        margin: 12px 0;

        h2 {
          display: inline-block;
          margin: 0 8px 0 0;
          font-size: $devui-font-size-page-title;
        }

        .d-overview-component-count {
          display: inline-block;
          width: 16px;
          height: 16px;
          line-height: 16px;
          text-align: center;
          font-size: $devui-font-size;
          color: $devui-disabled-text;
          border: 1px solid $devui-disabled-line;
          border-radius: $devui-border-radius;
          background-color: $devui-disabled-bg;
        }
      }
    }
  }

  .d-overview-component-wrapper {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;

    .d-component-place-holder,
    d-card {
      width: 320px;
      height: 0;
    }

    d-card {
      height: 230px;
      margin-bottom: 18px;
      cursor: pointer;
      transition: box-shadow $devui-animation-duration-slow $devui-animation-ease-in-smooth, transform $devui-animation-duration-slow $devui-animation-ease-in-smooth;

      &:hover {
        box-shadow: $devui-shadow-length-hover $devui-light-shadow;
        transform: translateY(-5px);
      }

      .d-overview-card-wrapper {
        text-align: center;
        position: relative;

        d-tag {
          position: absolute;
          top: 0;
          right: 0;

          & + d-tag {
            top: 24px;
          }

          &.d-overview-shadow:hover {
            box-shadow: $devui-shadow-length-connected-overlay $devui-shadow;
          }
        }

        .d-overview-card-icon {
          padding: 20px 0;
          height: 150px;

          img {
            width: 110px;
            height: 110px;
          }
        }

        .d-overview-card-title {
          font-size: $devui-font-size-card-title;
          line-height: $devui-line-height-base;
          color: $devui-text-weak;
          font-weight: $devui-font-title-weight;
          margin-bottom: 10px;
        }

        .d-overview-card-description {
          color: $devui-aide-text;
          white-space: nowrap;
          overflow: hidden;
          text-overflow: ellipsis;
        }
      }
    }
  }

  .d-overview-no-data {
    padding-top: 20px;

    .d-overview-no-data-title {
      font-size: $devui-font-size-page-title;
    }

    .d-overview-no-data-img {
      transform: translateX(-50%);
      margin: 20px 0;
      margin-left: 50%;
    }
  }
}

:host ::ng-deep d-tag {
  .devui-tag-item {
    cursor: pointer;
  }
}
